package com.zhu.instructions.base;

import com.zhu.rtda.Frame;

import java.nio.ByteBuffer;

/***
 * 跳转指令基类
 * 所有需要跳转偏移量的指令都继承此类
 */
public class BranchInstruction implements Instruction{
    // 跳转偏移量（有符号）
    protected int offset;

    @Override
    public void fetchOperands(ByteBuffer codeBuffer) {
        this.offset=codeBuffer.getShort();
    }

    @Override
    public void execute(Frame frame) {

    }
}
